package com.xiguthings.xiniu.iot.postproducer.worker.etcd;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.stereotype.Component;

import com.xiguthings.xiniu.iot.etce.PostRuleEtcdClient;

@Component
public class EtcdBeanCreater {
	@Value("${etcd_endpoints}")
	private String etcdEndpoints;
	@Value("${etcd.transfers.rule.key.keyword}")
	private String transfersKeyWord;

	@Bean
	public PostRuleEtcdClient postRuleEtcdClient() {
		PostRuleEtcdClient postRuleEtcdClient = new PostRuleEtcdClient(transfersKeyWord, etcdEndpoints);
		return postRuleEtcdClient;
	}
}
